add refernce to application assembly in the designer
I read in the user manual that I can add reference to my application's assembly (dll or exe) in the report designer. What is not clear is:
1- where to copy the actual assembly file of my application so that the designer can reference the assembly's name-spcae in its code/expressions?
2- Is there a way to tell the the fast-report designer to reference my assembly file directly from a folder location or is this done only by code?
3- what code to use for the previous point?
I tried compiling and running the sample (C:\Program Files\FastReports\FastReport.Net\Demos\C#\UserFunctions) but it keeps giving me two compiling errors
"The type or namespace name 'FastReport' could not be found (are you missing a using directive or an assembly reference?)" for the two using statements
using FastReport.Utils;
using FastReport;
Note: maybe it helps to know I am using VS2010. The demo "UserFunctions" was migrated to VS2010 using VS's migration wizard before trying to run the demo from VS.Net 2010
1- where to copy the actual assembly file of my application so that the designer can reference the assembly's name-spcae in its code/expressions?
2- Is there a way to tell the the fast-report designer to reference my assembly file directly from a folder location or is this done only by code?
3- what code to use for the previous point?
I tried compiling and running the sample (C:\Program Files\FastReports\FastReport.Net\Demos\C#\UserFunctions) but it keeps giving me two compiling errors
"The type or namespace name 'FastReport' could not be found (are you missing a using directive or an assembly reference?)" for the two using statements
using FastReport.Utils;
using FastReport;
Note: maybe it helps to know I am using VS2010. The demo "UserFunctions" was migrated to VS2010 using VS's migration wizard before trying to run the demo from VS.Net 2010
Comments
I attempted the following:
1- I created a class library project (MoonlightUtils) with a default namespace (Moonlight.Utils)
2- then copied the generated MoonllightUtils.dll to my LIB folder
3- in FastReport designer, I added a reference to the MoonlightUtils.dll file from the LIB folder
4- in FastReport's script window, I added the using statement (using Moonlight.Utils;)
5- when I try to preview the report I get the following message in FR (attached screen capture shows the same)
Error CS0006: Metadata file 'MoonlightUtils.dll' could not be found
What am I missing here ??
Got the hint from the forum, I copied my MoonlightUtils.dll to FR's folder "C:\Program Files\FastReports\FastReport.Net" and now I can call my util functions from FR's script.
Next thing I need to do is how to register my util functions in FR's data window.